package com.xtsoft.platform.globe.enums;

/**
 * 任务状态
 * @author defencez
 *
 */
public enum InfTaskState {
	Draft(0),  //草稿
	Start(1), //开始
	Finish(2),   //完成
	Termination(3); //终止
	
	private final int value;
	InfTaskState(int value) {
		this.value = value;
	}
	
	public int getValue() {
	    return value;
	}
	
	public static InfTaskState getEnumValue(int value) {
		InfTaskState result;
		switch(value) {
		case 0 :
			result =  InfTaskState.Draft;
			break;
		case 1 :
			result =  InfTaskState.Start;
			break;
		case 2 :
			result =  InfTaskState.Finish;
			break;
		case 3 :
			result =  InfTaskState.Termination;
			break;
			default:
			result = null;
			break;
			
		}
		
		return result;
		
	}
}
